package cs.inner;

public class Hotel {
    private String name,addr,tele;
    Zhizhao zhao=new Zhizhao("hf-baohe--1","2019-1-1","2025-12-31","包河区市场监督局");
    public Hotel(){}

    public Hotel(String name, String addr, String tele) {
        this.name = name;
        this.addr = addr;
        this.tele = tele;
    }

    public void show(){
        System.out.println("这个宾馆名字叫"+name+"\n地址在"+addr+"\n电话是"+tele);

    }
    public class Zhizhao{
         private String name="营业许可证";
         private String no;
         private String start,end;
         private String banfa;

        public Zhizhao(String no, String start, String end, String banfa) {
            this.no = no;
            this.start = start;
            this.end = end;
            this.banfa = banfa;
        }
        //每一个内部类都持有一个外部类的实例
        //外部类.this
        public void show(){
             System.out.println("这个营业执照编号是"+no+",起于"+start+",结束于"+end+",由"+banfa+"颁发");
             System.out.println("这个执照属于宾馆"+Hotel.this.name);
             Hotel.this.show();
        }
    }

    public static class Worker{
        private String name,handleset;
        public Worker(String n,String h){
            this.name=n;
            handleset=h;

        }
    }
}
